package arisufascion.com.constant;

import java.text.DecimalFormat;

import android.app.Activity;
import android.view.Window;

public class Utils {

	public static String TAG = "ArisuFascion";
	public static String MODE = "mode";

	public static void requestWindowFeature(Activity ac) {
		ac.requestWindowFeature(Window.FEATURE_NO_TITLE);
	}

	public static double round(double number, int digit) {
		if (digit > 0) {
			int temp = 1, i;
			for (i = 0; i < digit; i++)
				temp = temp * 10;
			number = number * temp;
			number = Math.round(number);
			number = number / temp;
			return number;
		} else
			return 0.0;
	}

	public static String priceWithoutDecimal(Double price) {
		DecimalFormat formatter = new DecimalFormat("###,###,###.##");
		return formatter.format(price);
	}

	public static String doubleToString2(double d) {
		DecimalFormat fmt = new DecimalFormat("0.00");
		String string = fmt.format(d);
		return string;
	}
}
